
#include "NetActionHandler.h"
#include "NetMsgHandler.h"
#include "CreatureManager.h"
#include "MapManager.h"



fint32				NetActionMsgHandler( GamePlayer* player , netMsgHead* head )
{
    CHECKMSG( SEND_RECV_MSG_ACTION )
	
	MapScene* scene = gMapManager->GetScene( player->GetMoveData().Pos.MapID );

	msg->type = _MSG_RECV_ACTION;
	msg->GUID = player->GetGUID();
	
	scene->SendMsgToAll( msg , player->GetGUID() );
	
	return GAME_NO_ERROR;
}



fint32		NetDirectionHandler( GamePlayer* player , netMsgHead* head )
{
    CHECKMSG( SEND_RECV_MSG_DIRECTION )

	MapScene* scene = gMapManager->GetScene( player->GetMoveData().Pos.MapID );
	scene->Direction( player , msg->Direction );

	msg->type = _MSG_RECV_DIRECTION;
	msg->GUID = player->GetGUID();

	scene->SendMsgToAll( msg , player->GetGUID() );

	return GAME_NO_ERROR;
}



fint32		NetLevelUpPointHandler( GamePlayer* player , netMsgHead* head )
{
    CHECKMSG( SEND_MSG_LEVELUP_POINT )
    
	player->LevelUpPoint( msg->type );

	return GAME_NO_ERROR;
}

